"""
Copyright (c) 2023 - present SKbioinfo
"""
from flask_restful import Resource
from flask import jsonify,request,current_app
from apps.API.utils.log_helper import lg
from apps.API.pipeExecutor.models import SampleSheet 
from flask_jwt_extended import jwt_required
from apps import db

class interfaceGroupEdit(Resource):
    @jwt_required() 
    def get(self,name):
        try:
            max_num=db.session.query(db.func.max(SampleSheet.group)).scalar()
            final_content={"max_num":max_num}
            response=jsonify(final_content)
            response.status=202
            return response
        except Exception as e:
            lg.error(e)
            return 404
        

